home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 1997
/
MacHack 1997.toast
/
Hacks
/
Hacks ’95
/
Roy’s Shameless Self-promotion
/
main.c
next >
Wrap
C/C++ Source or Header
|
1995-06-24
|
1KB
|
56 lines
#include <Types.h>
// Roy’s Shameless Self-promotion, MacHack 1995
#include <Memory.h>
#include <Quickdraw.h>
#include <Fonts.h>
#include <Events.h>
#include <Menus.h>
#include <Windows.h>
#include <TextEdit.h>
#include <Dialogs.h>
#include <OSUtils.h>
#include <ToolUtils.h>
#include <SegLoad.h>
void InitToolbox() {
InitGraf(&qd.thePort);
InitFonts();
FlushEvents(everyEvent, 0);
InitWindows();
InitMenus();
TEInit();
InitDialogs(0L);
InitCursor();
MaxApplZone();
}
void main() {
RgnHandle theRgn;
RGBColor niceColor,oldForeColor;
int w,h;
InitToolbox();
theRgn = (RgnHandle)GetResource('RGNX',1024);
OffsetRgn(theRgn, (qd.screenBits.bounds.right - qd.screenBits.bounds.left -
(*theRgn)->rgnBBox.right),
(qd.screenBits.bounds.bottom - qd.screenBits.bounds.top -
(*theRgn)->rgnBBox.bottom));
GetWMgrPort(&qd.thePort);
niceColor.red = 65535;
niceColor.green = 0;
niceColor.blue = 65535;
GetForeColor(&oldForeColor);
RGBForeColor(&niceColor);
FillRgn(theRgn, &qd.black);
DiffRgn(GetGrayRgn(), theRgn, GetGrayRgn());
RGBForeColor(&oldForeColor);
}